package com.link.base.base.cfgproperty.encryptor;


import org.jasypt.util.text.BasicTextEncryptor;

/**
 * @author yipeng.zhu@hand-china.com
 * @version 1.0
 * @date: 15:10 2018/12/4
 */

public class Encryptor {
    private static BasicTextEncryptor encryptor = new BasicTextEncryptor();
    /**
     * 加密参数秘钥
     */
    private static final String ENCRYPTOR_SECRET = "G0CvDz7oJn6_hand";

    static {
        encryptor.setPassword(ENCRYPTOR_SECRET);
    }

    public static String encrypt(String content) {
        return encryptor.encrypt(content);
    }

    public static String decrpt(String content) {
        return encryptor.decrypt(content);
    }
}
